package com.zq.controller;

import com.zq.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

/**
 * 用户Controller
 */
public class UserController {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:bean.xml");
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.saveUser();
    }
}
